<?php

/**
 * Facade_Resource
 * @copyright 2011
 * @version $Id$
 * @access public
 */
class Default_Model_Facade_Index{

	/**
	 * Constructor de la clase
	 * @return void
	 */
	public function  __construct() {

	}

	/**
	 * Lee los banners de una determinada seccion.
	 * @param mixed $resource: Objeto con los datos del recurso a leer.
	 * @return $sata  array
	 */
	public function readBannerSeccion($resource)
	{

		$TBD_Resource = new Default_Model_Index();
		try{
			$data = $TBD_Resource->readBannerSeccion($resource);
			return $data;
		}catch(Exception $e)
		{
			$error=array($e->getFile(), 'Exception: '.$e->getMessage());
			$ExceptionHandler= new Default_Model_ExceptionHandler();
			$ExceptionHandler->saveErrors($error);
		}
	}

	/**
	 * Obtenemos el logo de la empresa
	 * @return array $data
	 */
	public function getLogoEmpresa(){
		$TBD_Resource = new Default_Model_Index();
		try{
			$data = $TBD_Resource->getLogoEmpresa();
			return $data;
		}catch(Exception $e)
		{
			$error=array($e->getFile(), 'Exception: '.$e->getMessage());
			$ExceptionHandler= new Default_Model_ExceptionHandler();
			$ExceptionHandler->saveErrors($error);
		}
	}

	/**
	 * Obtenemos mensaje de bienvenida
	 * @return array $data
	 */
	public function getSeccionContent($to=null){
		$TBD_Resource = new Default_Model_Index();
		try{
			$data = $TBD_Resource->getSeccionContent($to);
			return $data;
		}catch(Exception $e)
		{
			$error=array($e->getFile(), 'Exception: '.$e->getMessage());
			$ExceptionHandler= new Default_Model_ExceptionHandler();
			$ExceptionHandler->saveErrors($error);
		}

	}

	/**
	 * Obtenemos los tripticos del post
	 * @param $to array
	 * @return array $data
	 */
	public function getTripticos($to=null){
		$TBD_Resource = new Default_Model_Index();
		try{
			$data = $TBD_Resource->getTripticos($to);
			return $data;
		}catch(Exception $e)
		{
			$error=array($e->getFile(), 'Exception: '.$e->getMessage());
			$ExceptionHandler= new Default_Model_ExceptionHandler();
			$ExceptionHandler->saveErrors($error);
		}

	}



	/**
	 * @param $to array
	 * @return array $data
	 */
	public function getNewProducts($to=null){
		$TBD_Resource = new Default_Model_Index();
		try{
			$data = $TBD_Resource->getNewProducts($to);
			return $data;
		}catch(Exception $e)
		{
			$error=array($e->getFile(), 'Exception: '.$e->getMessage());
			$ExceptionHandler= new Default_Model_ExceptionHandler();
			$ExceptionHandler->saveErrors($error);
		}

	}




	/**
	 * @param $to array
	 * @return array $data
	 */
	public function getFeaturedProducts($to=null){
		$TBD_Resource = new Default_Model_Index();
		try{
			$data = $TBD_Resource->getFeaturedProducts($to);
			return $data;
		}catch(Exception $e)
		{
			$error=array($e->getFile(), 'Exception: '.$e->getMessage());
			$ExceptionHandler= new Default_Model_ExceptionHandler();
			$ExceptionHandler->saveErrors($error);
		}

	}





}